< previous page page_413 next page >

Page 413
Setting the Graph Type
You determine the type of graph Visual Basic displays by setting the GraphType property. You can do this using the properties window during design time or through Visual Basic code at runtime. Because you already have the graph up on your form, move to the Properties window and locate the GraphType property. Set the property to display a three-dimensional pie chart by clicking the property in the window and then pulling down the list box. Find and select the 3D Pie option. Your screen should look like the one shown in Figure 11.3.
0413-01.jpg
Figure 11.3.
Changing the Graph Type property at design time.
The graph control can display 11 different types of graphs including bar charts, pie charts, line and area graphs, Log/Lin graphs, Gantt charts, scatter graphs, polar graphs, and high/low/close graphs. The three most commonly used formats are covered in this lesson: bar, pie, and line graphs.
How the Graph Control Organizes Your Data
Before you can display data, you have to load it into the graph control. But, before you load it, you need to know how the graph control expects to see the data. The graph control requires that all the data be organized in sets and points. The graph control needs to know how many points of data are in each set you want to graph. Usually, you have a single set of data with multiple points. For example, if you want to graph company sales figures for the last 12

 
< previous page page_413 next page >

If you like this book, buy it!